package com.duowei.diandan.viewmodel;

import android.arch.lifecycle.LiveData;
import android.arch.lifecycle.ViewModel;

import com.duowei.diandan.db.AppDatabase;
import com.duowei.diandan.db.entry.Jyxmsz;

import java.util.List;

public class SingleGroupViewModel extends ViewModel {
    private LiveData<List<Jyxmsz>> mLiveData;

    public LiveData<List<Jyxmsz>> getLiveData(String dmpzsdBm) {
        if (mLiveData == null) {
            mLiveData = AppDatabase.getDatabase().jyxmszDao().findByDmpzsdBm(dmpzsdBm);
        }

        return mLiveData;
    }
}
